//入口文件
import Vue from 'vue'
//导入路由
import VueRouter from 'vue-router'
//安装路由
Vue.use(VueRouter)

//导入vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)
//设置请求的根路径
Vue.http.options.root = "http://localhost";


//导入格式化时间的插件
import moment from 'moment'

import {Header, Swipe, SwipeItem,Button} from 'mint-ui'
Vue.component(Header.name,Header)
Vue.component(Swipe.name,Swipe)
Vue.component(SwipeItem.name,SwipeItem)
Vue.component(Button.name,Button)

import 'mint-ui/lib/style.min.css'
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'

import router from './router.js'
import app from './App.vue'


//定义全局的过滤器
Vue.filter("dateFormat",function(dateStr,pattern="YYYY-MM-DD HH:mm:ss") {
	return moment(dateStr).format(pattern);
})

var vm = new Vue({
	el: "#app",
	data: {
		msg: '123'
	},
	render: c => c(app),
	router
})
